home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Original Shareware 1.1
/
The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso
/
32
/
kalscope.zip
/
KALSCOPE.DCA
< prev
next >
Wrap
Text File
|
1984-08-14
|
31KB
|
1,128 lines
KALEIDOSCOPE
Topics
Introduction ...................1
Before You Begin ...............1
Getting Started ................2
Basic Terms and Concepts .......3
Two Points ...................3
Commands .....................4
Error Events .................4
The Profile ..................5
Help Screen - Single Key
Commands ......................5
a - Toggle Autorun Mode ......5
b - Change Background Color ..5
c - Clear the Screen .........6
e - Exit Program .............6
l - Last Pattern Back ........6
f - Freeze/Unfreeze Display ..6
h - The Help Screen ..........7
k - Toggle "Keep All" Mode ...7
m - Toggle Single-Color
Mode ....................7
p - Toggle Palette ...........7
r - Restore Parameters .......8
s - Save Parameters ..........8
w - Write Image ..............8
q - Query Autorun Mode .......8
t - Tailor Other Parameters ..8
Space - New Pattern ..........8
Tailoring Ring - Advanced
Features ......................9
Key Usage ....................9
The Global Parameter Screen ....10
Generations on Screen ........10
Drawing Mode .................11
Transfer Type ................11
Color Strategy ...............12
Base Color ...................12
Symettrriiees ................12
EightFold Path Bug ...........12
Start-up Bug .................12
Erasing Bug ..................12
Boredom Threshold ............13
Boredom Rho ..................13
Symmetry Coupling ............13
Background Fluidity ..........13
Palette Fluidity .............13
Pattern Age ..................14
Number of Palettes ...........14
The Individual Parameter
Screens .......................14
0 - Worm .....................14
1 - Random Walker ............15
2 - Parametric Glider ........15
3 - Random Dots ..............16
4 - Hypocycloid ..............16
File Parm Screen (Error Events,
too) ..........................16
The PRO File - Start-up
Settings ......................18
KALSHOW - Displaying PIC
Files .........................20
End of Topics
1
Introduction~
------------
This document consists of some vague
hints on how to use Kaleidoscope, the
Ultimate Silly Graphics generator.
Note that it is not a users' guide.
The very concept of a users' guide is
alien to the philosophy and spirit in
which the program was written.
Kaleidoscope is designed to be an
unpredictable program.
Having written three or four programs
in recent years, I have noticed an
unfortunate tendency among them:
either they work right, or they crash.
That is, either they do just what I
wrote them to do (and this is, after
all, pretty boring), or they do
something wrong that either causes
some part of the universe to print
silly messages and give up, or
alternately causes something to happen
that I would rather had not happened.
Kaleidoscope represents an attempt to
construct a program without this
unfortunate tendency (and to have
something around to mesmerize
otherwise talkative visitors). The
patterns it displays when left to
itself are unpredictable, even
(especially) to its author. On the
other hand, the program is not
unpredictable in the typical way of
programs; even in the file I/O
sections (and we all know about file
I/O) it is very unlikely to produce
any nasty messages, or do anything
annoying. In the event it encounters
a situation it does not understand, it
just selects a moderately
reasonable alternative, and continues
blithely on.
Before You Begin~
----------------
1. Back Up Your Kaleidoscope
Diskette.
2. Load DOS.
2
Getting Started~
---------------
If your use of Kaleidoscope is
restricted to having something useful
on your PC's color display while
you're at lunch, to impressing members
of the opposite sex, and generally to
passive admiration, this is the only
section you need to read.
To start it, put a diskette (or
equivalent) containing KALSCOPE.EXE
into a diskette drive (or equivalent)
connected to your PC, and type
KALSCOPE (or A:KALSCOPE or B:KALSCOPE
or whatever). This puts you into the
"logo" screen. Striking any key then
puts you into the program proper. At
this point, you should strike the "a"
key to turn on "autorun" mode (note
the pleasant "boop" tone). Now you
are set. Kaleidoscope displays an
ever-changing series of pleasing
(well, often pleasing) patterns.
Striking the space bar at any time
starts a new pattern, if the program
seems to be more interested in the
current pattern than you are. If
you'd like some other colors, you can
get a little bit advanced by playing
with the "b" and "p" keys. When you
wish to exit the program (to, for
instance, bring up a newer version of
it), strike the "e" key.
The author anticipates that the
average intelligent, sophisticated
user will not be satisfied with this
situation for long. Several urges
will most likely arise:
The urge to save the pretty pictures
for later admiration.
The urge to save the kind of pretty
picture currently being drawn.
The urge to modify the current pattern
ever so slightly, to make it even more
breathtakingly beautiful.
For the satisfaction of these urges,
see the next sections.
3
Basic Terms and Concepts~
------------------------
Two Points~
Kaleidoscope produces its images by
what is, at bottom, a rather simple
process. The program moves two points
about on the screen, and every time it
moves them, it draws zero or more
dot(s) and line(s) based on their new
position. In some cases, it also
draws the reflections of these dot(s)
and line(s) around various
cleverly-placed axes.
Now to get the amount of variation you
have seen in Kaleidoscope.
If you have not yet seen Kaleidoscope
run, I suggest you go back to the
Getting Started section and run it
contemplatively for a bit. From such
a simple concept, there must obviously
be a lot of variables (for variety, we
call them "parameters") floating
around. There are. Kaleidoscope has,
for instance:
o Five different overall ways of
figuring out the next spot one of
the points is going to occupy. Five
for each of the two points makes
twenty-five mixes of overall
point-motion strategies (which see).
Each strategy has zero or more (up
to about 15) sub-parameters.
o Seven different things that can be
done, given the current position of
the two points on the screen, and
the position they held last time
'round. The things include
connecting the points, drawing a
circle tangent to both of them,
simply drawing a dot at one point
and ignoring the other, etc. See
"Drawing Modes" below somewhere.
o Four possible levels of symmetry.
o Various bugs which can (well, one of
them) be turned on and off.
o Some other things I won't mention
(except indirectly, in this very
sentence).
4
Commands~
As a Kaleidoscope user, you
communicate with the program through
the keyboard. The most common
commands are issued by striking a
single key. Note that Kaleidoscope is
case insensitive; you can type in any
single-key command in either upper or
lower case.
One of the single-key commands ("t")
is used to enter the advanced
tailoring environment. This provides
access to less-frequently-used
parameters, allowing a subtlety of
control not available with the
single-key commands. The next two
major sections cover the single-key
and advanced facilities.
Error Events~
If you hear a friendly little
three-tone signal while Kaleidoscope
is running, it means that an error of
some sort has occurred. There's no
need to worry about this, as
Kaleidoscope in general continues
nonchalantly on. Should the sound
persist (and even threaten to become
unpleasant), striking the space bar to
begin a new pattern should stop it
(and the plucky little error causing
it).
If you become unbearably curious about
the nature of the error, see below,
under (what else) "The File Parameter
Screen."
A slightly less friendly single-tone
signal is produced if you enter
an obviously useless number while on
one of the tailoring screens (which
see). Kaleidoscope usually does
anything that you ask it to, but there
are a few things up with which it
simply will not put.
5
The Profile~
After using Kaleidoscope for a bit,
you may discover that there are
certain things you do every time you
bring it up, to tailor the more global
parameters (like number of palettes,
fluidities, etc) to your own tastes.
To avoid having to do this initial
setup every time, Kaleidoscope
provides you with the ability to
specify some initial parameters in a
file. This PRO file is described in
detail far below.
Help Screen - Single Key Commands~
---------------------------------
The Help Screen is a single panel that
tells the user what all the single-key
commands do. To get the help screen,
strike the "h" key. Rough
descriptions of the commands follow.
a - Toggle Autorun Mode~
Striking the "a" key turns autorun
mode on if it was off, and off if it
was on. When you strike "a", you
hear a tone that reflects the new
setting of Autorun. The higher tone
indicates that Autorun is now off; the
lower tone, that it is on.
In Autorun mode, Kaleidoscope
occasionally becomes tired of the
current pattern, and abandons it to
start a new one. How long it takes to
get tired is determined by the two
Boredom Parameters on the Global
Parameter screen (see below).
b - Change Background Color~
Striking the "b" key changes the
background color to the next one.
Striking the key eight times gives the
same background color (after a bit of
decorative flashing), but in a higher
(or lower) intensity.
6
c - Clear the Screen~
Striking the "c" key clears the
screen. It has no other effect on the
currently active pattern, but I think
it does reset the count of how long
the pattern has been active (kept for
boredom determination purposes).
e - Exit Program~
This key terminates the program,
and returns the PC to whatever monitor
Kaleidoscope was invoked from. It
should not be used except in case of
emergency, or a new version of
Kaleidoscope is available for
installation on the PC, or in the
unlikely event that you find some
other program that you would like to
run.
l - Last Pattern Back~
It is a frequent occurrence while in
AutoRun mode to glance up at your
display from the Sunday Times, be
amazed and thrilled at the beauty of
the pattern Kaleidoscope is currently
working on, and see it vanish before
you can reach the "a" key. To cut
down on the number of broken hearts,
the "l" command gets back
(approximately) the parameters most
recently abandoned. Sometimes the
colors are different or something,
but that's part of the fun.
f - Freeze/Unfreeze Display~
Striking the "f" key when the display
is not frozen freezes it. Striking it
when the display is frozen unfreezes
it. When the display is frozen, most
of the keys have the usual effects,
but drawing of the current pattern is
suspended. This is useful, for
instance, for getting a picture just
right before saving it.
7
h - The Help Screen~
Displays the Help Screen. Hit any key
to return to the current pattern with
a clear screen.
k - Toggle "Keep All" Mode~
One of the clever things that
Kaleidoscope does is to sometimes keep
some number of generations on the
screen, by erasing an old bunch of
lines every time it draws some new
ones. If it is doing this, and you'd
like it to stop (or you have stopped
it this way already, and you'd like it
to start again), hit the "k" key. If
you'd like to change the number of
generations kept, you can do it on the
Global Parameter screen (see below).
When a new pattern starts up, "Keep
All" mode is turned off.
m - Toggle Single-Color Mode~
When I first wrote Kaleidoscope, it
was always solid yellow on a blue
background. Sometimes I get
nostalgic; this key is for me.
p - Toggle Palette~
Changes to/from blue-white-purple
from/to red-green-yellow (with
red-white-cyan thrown in on RGB
screens if the "Number of Palettes"
parameter is set to 3; see below).
8
r - Restore Parameters~
Reads the parameters from the
currently selected drive and file
(these are determined on the File
Parameter Screen, probably described
below), and start drawing a pattern
from them. Looks for a file called
Pnnnn.PRM on the selected drive. If
it doesn't find it, the usual error
tones sound, and it continues
with whatever it was doing. This
command also increments the "File to
Restore From" number, to get you ready
for the next restore.
s - Save Parameters~
Does the opposite of "r". Except,
of course, that rather than
incrementing the "File to Restore
From" number, it increments the "File
to save PRM to" number, so next time
you hit "s" you don't overlay the PRM
file.
w - Write Image~
Writes the current state of the
screen in BSAVE format, into Pnnn.PIC,
where nnn is the "File to Save PIC to"
number from the fabled File Parameter
screen. Increments that number.
q - Query Autorun Mode~
Does everything that "a" does, except
for affecting the Autorun setting.
t - Tailor Other Parameters~
This puts you into the ring of
Tailoring Screens, that are described
in more detail below. It puts you
onto the last screen you saw, with the
cursor where it was last, on the
theory that you might still be
interested.
Space - New Pattern~
If the current pattern isn't to your
liking, pressing the space bar calls
up a new one. The previous one may be
regressed to with the "l" command,
which see.
9
Tailoring Ring - Advanced Features~
----------------------------------
Striking the "t" key while in
Kaleidoscope proper brings you into
the ring of Tailoring Screens. While
in the ring, you can change almost
everything I could think of in the way
of currently-effective parameters.
You can, for instance, increase the
symmetry of the current pattern,
change a worm into a hypocycloid,
alter the step-length of a random
walker, change which diskette (or
equivalent) is used to save parameter
files to, and even turn on the
normally-off EightFold Symmetry Bug.
Key Usage~
While in the tailoring ring, the
following keys have approximately the
following effects. No other keys
should do anything to speak of.
Tab
Takes you to the next screen in the
ring.
Escape
Takes you out of the ring, back to
Kaleidoscope proper.
Arrows
Moves the cursor (a red
right-pointy-brace) around on the
screen. The up and down arrows move
the cursor up and down, wrapping at
the top and bottom of the screen. The
sideways arrows toggle the cursor
between the two possible columns.
Enter
Selects the item the cursor is
currently pointing to as something
that you want to change. Striking
Enter results in a red "Enter New
Value" prompt down in one corner of
the screen. Enter the desired new
value for the item, and hit Enter
again. If you have successfully
changed something of interest, the
screen is re-displayed with the
new value. Hitting Enter with the
cursor not pointing to anything in
particular causes (what else?)
unpredictable results.
10
The Global Parameter Screen~
---------------------------
The first screen you see when entering
the tailoring ring for the first time
is the Global Parameter Screen. This
screen allows you to examine and alter
various parameters that effect the
pattern being drawn, and the overall
behavior of the system.
The following fields appear on the
screen. "Generations on screen"
through "Erasing bug" are in the
left-hand column (in the order that
they appear below, and "Boredom
Threshold" through "Number of
Palettes" are in the right-hand
column.
Generations on Screen~
Effects how many generations are
displayed on the screen (temporarily
overridable by the "k" command). If
this is set to 0, all generations are
kept.
11
Drawing Mode~
This selects the drawing mode: what
dot(s) or line(s) are drawn, given the
current locations of the two points.
Valid values here are 0 through 7,
corresponding to:
0 - Draw a dot at the first point
location.
1 - Draw a dot at both point
locations.
2 - Draw a line between the locations.
3 - Connect each current point
location with the just-previous
location of the same point.
4 - Draw the lines described in 2 and
3.
5 - Draw a box with the two points as
diagonally opposite corners.
6 - Draw a circle (approximately)
tangent to the two points.
7 - Draw an (approximately) isosceles
triangle with the two points as
the base vertices, and the top
vertex determined by some equation
that I have forgotten.
Transfer Type~
If the transfer type is 1, new
positions of point 1 are taken from
the current (old) position of point 2,
rather than from point 1's own
motion-strategy. This is useful for
tracing a single figure. If the
transfer type is 2 or 3, point 1 is
moved according to its own
motion-strategy.
12
Color Strategy~
This has to do with how many colors
are used in the display. I think 1
means always use a single color
(although symmetrical reflections are
in other colors), 2 means use a
different color for each point, and 3
and 4 are various level of randomness.
Base Color~
This has something to do with altering
the color that the Color Strategy
takes as a jumping-off place.
Changing the value does not generally
seem to effect anything, though.
Symettrriiees~
This determines how many dot(s) or
line(s) are actually drawn for each
one called for by the Drawing Mode.
Valid values are 1, 2, 4 and 8.
EightFold Path Bug~
When eightfold symmetry is in effect,
the fact that the screen is not as
tall as it is wide sometimes causes
the points being drawn to smash into
the upper and lower walls of the
screen. As this is a bad thing, there
is a hook in the program that
restricts the scope of drawing to the
safe central portion of the screen
when the symmetry level is 8.
Changing the value of this parameter
to 1 enables the bug by de-enabling
the hook.
Start-up Bug~
There is often garbage drawn at the
beginning of a pattern (particularly
when the transfer type is 1). If you
turn this bug on, by changing the
value of this parameter to 1, there
is even more.
13
Erasing Bug~
Some of the more pleasing, shimmering
patterns that Kaleidoscope produces
are due to a bug in the erasure of old
dots and lines when the drawing mode
is 3 or 4 and the "Generations on
Screen" is not "All". When I find
that bug, this parameter will turn it
on and off.
Boredom Threshold~
This is (approximately) the minimum
number of seconds the program spends
on a pattern in Autorun mode before
getting bored and switching.
Boredom Rho~
This is the probability (per
generation) that Kaleidoscope will get
bored and switch after the boredom
threshold has been crossed
Symmetry Coupling~
If this parameter is 1, Kaleidoscope
draws lines between each point and its
symmetric reflections, if any (0, 1, 3
or 7 of them).
Background Fluidity~
This is the probability that, each
generation, Kaleidoscope gets tired of
the current background color, and
change it (or leaves it the same).
Palette Fluidity~
You guessed it! The number of
palettes randomly chosen among is
determined by the "Number of Palettes"
parameter, described shortly.
14
Pattern Age~
This is the number of seconds of the
current pattern that have passed, for
purposes of boredom determination.
Altering any parameter resets this to
zero. So do some other things. You
can't change this parameter yourself.
Number of Palettes~
This one requires more explanation
than I am likely to give. If you have
a conventional RGB screen, change this
to 3 and you have a red-white-and-blue
palette in addition to the other two.
If you have a composite or TV screen,
you probably want to leave it at 2
(the default).
The Individual Parameter Screens~
--------------------------------
Each of the two Individual Parameter
screens displays the parameters for
one of the points. The parameters
displayed depend on the
motion-strategy for that point. To
change the motion-strategy for a
point, go to the appropriate
individual parameter screen, move the
cursor to the line with the name of
the strategy (row 4), and hit enter.
Then enter the number of the strategy
you would like, from the list that
follows.
0 - Worm~
A worm is a little creature that moves
at random about the screen, one pel at
a time (that's logical pels, for you
display hackers). His three
parameters are:
Laterality
Determines whether the worm moves like
a bishop (0), like a rook (1), or like
a king (2).
15
Turn Strategy
When the worm has decided to turn (go
in a new direction), it either changes
to an adjacent vector (0), or picks a
new direction at random (1).
Rho
This is the chance that the worm
continues in the same direction next
generation.
1 - Random Walker~
A random walker is just like a worm,
except that it moves several pels per
generation. The number of pels is the
worm's length.
2 - Parametric Glider~
This creature moves along a path
determined by a pair of parametric
equations, one for each coordinate (X
and Y). Each generation, the value of
"t" is incremented by "dT", and a new
X and Y determined. There are two
rows of parameters on the glider
screen; the left-hand row shows the
parameters for the X coordinate, the
right-hand row for Y. The general
equation for a new coordinate, given
"t" and the parameters, is supposed to
be
K + B ( M1 sin ( A1 + M2 t ) + M3 cos
( A2 + M3 t ) )
normalized to fit on the screen. I
suspect the actual equation is indeed
something like that.
16
3 - Random Dots~
Requiring no parameters, random dots
just jump merrily about on the screen,
with the new location of the point
having nothing at all to do with the
old one.
4 - Hypocycloid~
You probably saw these first as a
child. Remember the little plastic
toothed wheels, the colored pens and
pins, and trying not to tear the
paper? The wheel ratio is the ratio
of the number of teeth on the little
wheel to the number of teeth on the
big wheel, and the offset from center
is the distance (in units of the big
wheel's radius) from the center of the
little wheel to the drawing hole.
"dT" is used in about the same way as
in the parametric glider. The
equations for this took me a couple of
days to figure out, so I'm leaving
them as an exercise for the reader.
File Parm Screen (Error Events, too)~
------------------------------------
The numbers on this screen control the
diskettes (or equivalent) used to save
and restore images and parameter sets,
and the names of the files that are
used. Parameter sets are stored in
files called "Pnnnnnnn.PRM", and
images are stored (in BSave format) in
files called "Pnnnnnnn.PIC". The
nnnnnn is taken from this very screen,
as is the diskette letter to use.
17
Every time you issue a save ("s" or
"w") command or a restore ("r")
command, the corresponding file number
on this screen is incremented. So if
you set, for instance, the "File to
write PIC to" number to 20, then issue
the "w" command five times in the
course of an hour, you have created
the files "P20.PIC" through "P24.PIC"
on the selected disk. If you want to
display a series of patterns saved in
files "P32.PRM" through "P41.PRM" on
drive B, you can set the "Disk to
Restore From" letter to "B", the "File
to Restore From" number to 32, then go
back to Kaleidoscope proper, and hit
"r" ten times (at reasonable
intervals, of course, to give your
viewers time to be awed).
Note that "r" does not always restore
all the information about a pattern;
sometimes (as with "l") the colors and
things are different, for variety's
sake.
This screen (because it had lots of
blank space) is also used to record
error events. When something that
BASIC thinks of as an error occurs,
Kaleidoscope alerts you with a
friendly little three-tone sound, and
records the error's Magic Error Number
and Location on this screen. To find
out the nature of your error, go to
this screen, and look up the error
code in the back of your BASIC manual.
You will undoubtedly discover that it
was your fault.
18
The PRO File - Start-up Settings~
-------------------------------
The default values for the more global
Kaleidoscope parameters, like initial
background color, number of palettes,
fluidities, and other things that
don't (usually) change with a new
pattern, may not be what everyone
wants. It is common for a user to
develop the habit of hitting 'b' seven
times, 'a' once, then 't', a bunch of
cursor controls, enter, a number,
enter again... and so on for several
dozen keystrokes; all for the sake of
getting the environment the way it
ought to have been in the first place.
This sort of user has not read this
section.
* A sample KALSCOPE.PRO file
* Don't hold logo screen, and load in
my favorite
* PRM file on start-up.
% r
* Set the parameters
8 should be the boredom threshold
0.05 should be the boredom rho
0.001 should be the palette fluidity
0 should be the background fluidity
3 is the number of palettes
8 is the initial background color
2 is the initial palette (special RGB
palette)
1 is the initial autorun setting
0 (off) is the initial setting of
single-color mode
1 (on) is the eightfold bug
0 (off) is the start-up bug
0 (off) is the erasing bug
C is the disk to restore from
0 is the initial file number to
restore from
A is the disk to save PIC files to
12 is the initial number for PIC files
A is the disk to save PRM files to
27 is the initial number for PRM files
* and that's all.
19
When it is first invoked, Kaleidoscope
looks for a file called "KALSCOPE.PRO"
in the current default directory. If
the file is not found, all default
values for everything in general are
taken, and the pleasant little error
bleep sounds to let the user know. If
the file is found, certain parameter
values are taken from it, and some
initial commands can be executed by
it.
The lines in the PRO file are
interpreted as follows:
All lines which are completely blank,
or which have a squashed-bug character
("*") in column one, are completely
ignored.
All lines that have an interest-mark
character ("%") in column one are
treated specially. The rest of the
characters in the line are put into a
FIFO queue. Yes, this is in fact
redundant, as all queues are FIFO, but
as a CMS user I have seen enough
references to "FIFO stacks" that I
tend to play it safe. When
Kaleidoscope begins to execute,
characters are taken from this queue,
and treated just as if they had been
entered as single-key commands from
the keyboard. The only really useful
use for this is to specify (by
including an "r" in the queue) that an
initial PRM file should be loaded on
start-up. If the first character
after the interest-mark is a blank,
the logo screen will be displayed for
about a second, then disappear,
without waiting for the usual
keystroke.
Any lines not covered by the points
above are interpreted as value lines.
The initial characters in each of
these lines are treated as numeric
values (skipping leading blanks),
except for the lines about disk
letters, where the first character are
used. The values obtained from the
lines are assigned to the accessible
parameters.
20
Which parameters are accessible, and
what order they are assigned in,
should be inferred by the observant
user from the sample profile given.
If fewer than 18 value lines are in
the file, defaults are used for the
remainder. Note, however, that if you
wish to change the default for some
parameter, you must specify values for
all parameters coming before the one
you want to change (nyeh-he-he). For
instance, to specify a non-default
initial value for the autorun setting,
you must give values for the first
seven parameters as well.
Note: The use of ringlore and other
middle-earth poetry in PRO files is
not recommended.
KALSHOW - Displaying PIC Files~
------------------------------
KALSHOW is an ancillary program that
may be used while in DOS to copy a PIC
file (saved with the "w" command in
Kaleidoscope) onto your color screen.
The pattern is displayed just as you
saved it, and you are given a chance
to change the background color and
active palette (which are not saved in
the PIC file).
Note that Kaleidoscope itself has no
provision for reading PIC files. If
you want to save a pattern for later
use in Kaleidoscope, use "s" to create
a PRM file. "w" should be used to
save particularly striking screen
images, for later use by KALSHOW or
other programs that like BSave format.
To use KALSHOW, type KALSHOW, and
respond to the prompt with the full
drive specifier, name and type of the
PIC file (for example, "C:P54.PIC").
The image is loaded, and you may then
use the "b" and "p" keys to change the
active colors. When you are done, use
the "e" key to exit. You are then be
prompted for another PIC file to
display. If you don't want to display
any more, just press Enter. When
KALSHOW completes, it returns to DOS,
so one effective use of KALSHOW is on
a two-display PC, with the monochrome
monitor (MODE MO) active.